/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Model;
import java.io.Serializable;
import java.util.Comparator;
/**
 *
 * @author oskar
 */
public class CostComparator implements Comparator<Trip>, Serializable {
    
    public int compare(Trip t1, Trip t2)
    {
        if(t1.getPrice()>t2.getPrice())
            return 1;
        else if(t1.getPrice()<t2.getPrice())
            return -1;
        return 0;
        
    }
}
